package com.m.polymorphic;

public class Manuscript extends IncomeAbstract {


    public Manuscript(Double income) {
        this.income = income;
    }

    /**
     * 稿费收入计税
     * @return
     */
    @Override
    public Double getTex(){
        if (super.income != null) {
            if (super.income < 4000 && super.income > 0) {
                return 800d;
            } else if (super.income > 4000) {
                return (super.income - 4000) * 0.14 + 800;
            }
        }
        return 0d;
    }


    public Double getIncome() {
        return this.income;
    }
}
